<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">


<h:head>
<title>Edit</title>
</h:head>
<h:body>
<p:layoutUnit id="top" position="north" size="15%">
                <p:toolbar>  
    				<p:toolbarGroup align="left">
                	<h3><h:link outcome="home.html" value="TravelDream" /></h3>
                	</p:toolbarGroup>
                	<p:toolbarGroup align="right">
                <h:form>				   
				        <p:commandButton action="#{logoutBean.logout}" value="Logout" />				
			   </h:form>
                	<p:spacer width="10"></p:spacer>               	
                	<p:spacer width="10"></p:spacer>
                	</p:toolbarGroup>
                </p:toolbar>
</p:layoutUnit>

<h:form>  
    
  	<p:panel id="UpPanel" header="Account Editing">
  	<h3>
            <h:panelGrid id="panGrid">
            <h:outputText value="Name: " />  
            <p:inplace id="name" editor="true">  
                <p:inputText value="#{editBean.currentUser.name}"  
                            required="true" label="text"/>  
            </p:inplace> 
            
            <br/>
            <br/>
            
            <h:outputText value="Surname: " />  
            <p:inplace id="surname" editor="true">  
                <p:inputText value="#{editBean.currentUser.surname}"  
                            required="true" label="text"/>  
            </p:inplace> 
            
            <br/>
            <br/>
            

            
            </h:panelGrid>
            </h3>
        </p:panel>
  			
  			<br/>
            <br/>
            
			<p:commandButton value="Confirm Data" update="panGrid"
				action="#{editBean.updateCurrentUser()}" />	 

</h:form>


</h:body>
</html>